//
//  NinePicCollectionViewCell.m
//  SXH
//
//  Created by Ryan on 15/12/8.
//  Copyright © 2015年 lyss. All rights reserved.
//

#import "NinePicCollectionViewCell.h"
#import "UIImageView+AFNetworking.h"
@implementation NinePicCollectionViewCell

- (instancetype)initwithModel:(HotSpotModel *)model
{

    if (self)
    {
        self.mainImage = [[UIImageView alloc]initWithFrame:self.bounds];
        [self addSubview:self.mainImage];
        [self.mainImage setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/%@",IMAGE_URL,model.album_thumb]]];
        self.titleLbl = [[UILabel alloc]init];
        [self addSubview:self.titleLbl];
        [self.titleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@0);
            make.right.equalTo(@0);
            make.bottom.equalTo(@0);
            make.height.equalTo(@25);
        }];
        self.titleLbl.backgroundColor = [UIColor blackColor];
        self.titleLbl.textAlignment = NSTextAlignmentCenter;
        self.titleLbl.font = [UIFont systemFontOfSize:14];
        self.titleLbl.textColor = [UIColor whiteColor];
        self.titleLbl.alpha = 0.74;
        self.titleLbl.text = model.title;
    }
    return self;
}


@end
